package com.yuan.zsschool.common;

import com.yuan.base.framework.BaseAppContext;
import com.yuan.base.framework.BaseUserManager;
import com.yuan.base.utils.PreferencesUtils;

public class PrefCache {

	public static void setZan(boolean flag, int pushId, int type) {
		String key = "zan_" + BaseUserManager.getUser().getPhone1() + "-" + pushId + "_" + type;
		PreferencesUtils.putBoolean(BaseAppContext.getInstance(), key, flag);
	}

	public static void setCai(boolean flag, int pushId, int type) {
		String key = "cai_" + BaseUserManager.getUser().getPhone1() + "-" + pushId + "_" + type;
		PreferencesUtils.putBoolean(BaseAppContext.getInstance(), key, flag);
	}

	public static boolean getZan(int pushId, int type) {
		String key = "zan_" + BaseUserManager.getUser().getPhone1() + "-" + pushId + "_" + type;
		return PreferencesUtils.getBoolean(BaseAppContext.getInstance(), key, false);
	}

	public static boolean getCai(int pushId, int type) {
		String key = "cai_" + BaseUserManager.getUser().getPhone1() + "-" + pushId + "_" + type;
		return PreferencesUtils.getBoolean(BaseAppContext.getInstance(), key, false);
	}

}
